package com.szzg10.thinking.chapter11;

public class StackCollision {

	public static void main(String[] args) {
		
		com.szzg10.thinking.chapter11.Stack<String> stack = new com.szzg10.thinking.chapter11.Stack<String>();
		for(String element: "My dog has fleas".split(" ")) {
			stack.push(element);
		}
		
		while(!stack.empty()) {
			System.out.print(stack.pop() + " ");
		}
		System.out.println();
		
		java.util.Stack<String> stack1 = new java.util.Stack<String>();
		for(String element: "My dog has fleas".split(" ")) {
			stack1.push(element);
		}
		
		while(!stack1.empty()) {
			System.out.print(stack1.pop() + " ");
		}
		
	}
}
